<% /* $Id: users.jsp 132 2011-08-26 10:23:42Z altdotua@gmail.com $ */ %>

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<%@ include file="header.jsp" %>

<h2 align="center"><%= bundle.getString("W_USERS") %></h2>

<table>
	<tr bgcolor="Gainsboro">
		<th>#</th>
		<th><%= bundle.getString("W_USERNAME") %></th>
		<th><%= bundle.getString("W_ROLE") %></th>
<!--		<th>UAC</th>
		<th>UWA</th>
		<th>AC</th>
		<th>WA</th> -->
	</tr>
	
<%
	Map<String, Object> map = new HashMap<String, Object>();
	if (request.getParameter("role") != null)
		map.put("role", request.getParameter("role"));
	List<UserEntry> entries = UsersModel.getEntries(map);
	for (UserEntry user2: entries)
	{
%>
	<tr>
		<td><a href="<%= Linker.link("user.jsp") + "?user_id=" + user2.getId() %>"><%= user2.getId() %></a></td>
		<td><a href="<%= Linker.link("submissions.jsp?user_id=" + user2.getId()) %>"><%= StringEscapeUtils.escapeHtml(user2.getUsername()) %></a></td>
		<td><a href="<%= Linker.link("users.jsp?role=" + user2.getRole()) %>"><%= user2.getRole() %></a></td>
	</tr>
<%
	}
%>
</table>


<%@ include file="footer.jsp" %>